home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / super_su.swf / scripts / DefineSprite_605 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-04-19  |  954 b   |  45 lines

  1. function mSetAngle(intAngle)
  2. {
  3.    if(this.intCnt == 0)
  4.    {
  5.       this.mSetPose("surfing");
  6.    }
  7.    var increment = 6.283185307179586 / this.intSteps;
  8.    var step = Math.round(intAngle / increment);
  9.    step %= this.intSteps - 1;
  10.    if(step < 0)
  11.    {
  12.       step = 32 + step;
  13.    }
  14.    if(this._parent.strMode == "surfing")
  15.    {
  16.       this.gotoAndStop("surfing" + step);
  17.    }
  18.    if(this._parent.strMode == "paddling")
  19.    {
  20.       this.gotoAndStop("paddling");
  21.    }
  22.    if(this._parent.strMode == "hit")
  23.    {
  24.       this.gotoAndStop("hit" + step);
  25.    }
  26.    if(this._parent.strMode == "fall")
  27.    {
  28.       this.gotoAndStop("fall");
  29.    }
  30.    this.intCnt--;
  31. }
  32. function mSetPose(strPose)
  33. {
  34.    this._parent.strMode = strPose;
  35.    if(strPose == "hit")
  36.    {
  37.       this.intCnt = 5;
  38.    }
  39. }
  40. this.intSteps = 32;
  41. stop();
  42. this.intCnt = -1;
  43. this.hexColorRopa = this._parent.hexColorRopa;
  44. this.hexColorTabla = this._parent.hexColorTabla;
  45.